import { CommodityModel } from "./Commodity";
import { UserModel } from "./User";

interface Orders {
    oid?: number;
    uid: number;
    gid: number;
    count: number;
    price: number;
    pay: string;
    status: number;
    expressStatus?: number;
    createTime: Date;
    applyTime?: Date;
    address: string;
    user?: UserModel;
    commodity?: CommodityModel;
    receiveTime?: Date;
    integral: number;
}

export class OrdersModel implements Orders {
    oid?: number | undefined;
    uid!: number;
    gid!: number;
    count!: number;
    price!: number;
    pay!: string;
    status!: number;
    expressStatus?: number | undefined;
    createTime!: Date;
    applyTime?: Date | undefined;
    address!: string;
    user?: UserModel | undefined;
    commodity?: CommodityModel | undefined;
    receiveTime?: Date | undefined;
    integral!: number;

}